package com.resource.transactions.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Configuration
public class SpringMvcConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("main");

    }

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/static/**").addResourceLocations("/static/");
        registry.addResourceHandler("/assets/img/users/**").addResourceLocations("file:F:\\IDEA_CODE\\rets\\rets-user-interface\\src\\main\\resources\\static\\assets\\img\\users\\");
        registry.addResourceHandler("/assets/img/project/**").addResourceLocations("file:F:\\IDEA_CODE\\rets\\rets-user-interface\\src\\main\\resources\\static\\assets\\img\\project\\");
    }
}
